#!/usr/bin/perl -w
use 5.010;
print "Enter string\n";
while (<>) {
chomp;
  if (/(?<name1>.*a\b)/) {
  print "word contain a is '$+{name1}' \n";
  last;
  } else {
    print "No match |$_|\n";
    }
}
